﻿
@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>基础设置</title>
    @await Html.PartialAsync("~/Views/Shared/_Import.cshtml")
    <style>
        .layui-upload {
            display: block;
            margin: 0 auto;
            /*border: 1px solid #c0c0c0;*/
            padding: 2px;
        }

            .layui-upload img {
                height: 177px;
                width: 377px;
            }

        .layui-form-select {
            width: 377px;
            margin-top: 10px;
        }
        .layui-form-item .layui-input-inline{
            width: 260px;
        }
    </style>
</head>
<body>
    <div class="admin-main layui-fluid">
        <div class="layui-card">
            <div class="layui-card-body">
                    <form class="layui-form" id="form" name="form" lay-filter="form">
                        <div class="layui-form-item">
                            <label class="layui-form-label">公司名称</label>
                            <div class="layui-input-inline">
                                <input type="text" name="orgName" required lay-verify="required" maxlength="64" placeholder="请输入公司名称" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">联系电话</label>
                            <div class="layui-input-inline">
                                <input type="text" name="mobilePhone" required lay-verify="required" maxlength="20"  placeholder="请输入联系电话" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">传真号码</label>
                            <div class="layui-input-inline">
                                <input type="text" name="fax" required lay-verify="required" placeholder="请输入传真号码"  maxlength="20" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">客服Q Q</label>
                            <div class="layui-input-inline">
                                <input type="number" name="qqNum" required lay-verify="required" placeholder="请输入客服Q Q" maxlength="20"  autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">公司地址</label>
                            <div class="layui-input-inline">
                                <input type="text" name="address" required lay-verify="required" placeholder="请输入地址" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn layui-btn-normal" id="btn-basic-save" type="button" lay-submit lay-filter="btn-basic-save">立即提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
    </div>

    <script>
        layui.use(['table', "ajax", "element", "form", 'upload', 'msgbox', 'jquery'], function () {
            var element = layui.element;
            var ajax = layui.ajax;
            var form = layui.form;
            var $ = layui.$;


            /**
             * 基本参数
             */

            $.getJSON("/api/setting/QueryBasic").done(function (response) {
                form.val('form', response.result);
            });
            form.on('submit(btn-basic-save)', function (data) {
                ajax.post(data.field, "/api/setting/SaveBasic").success(function (response) {
                    layer.alert(response.result);
                });
            });
        });
    </script>
</body>
</html>
